﻿using System.Xml.Serialization;

namespace Alex.HydroDynLib.Measures
{
    [XmlRoot("Measure")]
    class Measure : MeasureBase
    {
        #region Construct

        public Measure()
        {
            value = 0;
        }

        public Measure(double val)
        {
            value = val;
        }

        public Measure(double val, string meas)
        {
            value = 0;
            measure = meas;
        }

        public Measure(Measure meas)
        {
            value = meas.value;
            measure = meas.measure;
        }

        #endregion
        
        [XmlElement("Value")]
        public override double Value
        {
            get { return value; }
            set { this.value = value; }
        }

        public override string Measure
        {
            get { return measure; }
        }

        public override string ToString()
        {
            return Value.ToString() + " " + Measure;
        }

        private string measure = "Undimentional";
    }
    }
}
